package cn.zff.controller;

import cn.zff.service.UserInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;

/**
 * @author Charlie Puth
 * @version 1.0
 * @date 2022/03/09 10:50
 */
@Controller
public class UserInfoController {

    @Resource
    private UserInfoService userInfoService;

    @GetMapping
    public String home(Integer id, Model model) {
        model.addAttribute(userInfoService.selectUserInfoById(id));
        return "index";
    }
}

